import { App } from "vue";
const exportUtilsConFn = (app: App) => {
  const modules = import.meta.glob('./**/index.vue',
    { eager: true }
  );
  const list = Object.keys(modules)
  const nameList = list.map(item => {
    const modulePath = (modules[item] as any)
    const arr = item.split('/')
    const name = arr?.[1].split('.')[0]
    return { name: name, component: modulePath.default };
  })
  nameList.forEach((element) => {
    app.component('utilsCon-' + (element.name), element.component)
  });
}
export default exportUtilsConFn